// 引入Vue
import Vue from 'vue'
// 引入App
import App from './App.vue'
// 引入字体库
import '@/assets/css/fonts.css'
// 引入iconfont样式
import '@/assets/iconfont/iconfont.css'
// 引入axios
import axios from 'axios'
// 引入VueRouter
import VueRouter from 'vue-router'
// 引入路由器
import router from './router/index.js'
// 全局引入mavonEditor
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// 引入仓库
import store from './store'
import VueLazyload from 'vue-lazyload'
import lazy from './directive/lazy'
Vue.use(ElementUI);
Vue.use(VueLazyload)

Vue.use(mavonEditor)
// 关闭Vue的生产提示
Vue.config.productionTip = false

Vue.prototype.$axios = axios

// 应用插件
Vue.use(VueRouter)

Vue.directive('lazy', lazy)

//创建vm
new Vue({
    el: '#app',
    render: h => h(App),
    router,
    store,
    beforeCreate(){
		Vue.prototype.$bus = this	//安装全局事件总线
	}
})